package com.shun.oss.common;

import com.aliyun.oss.model.CannedAccessControlList;

/**
 * OSS数据访问类型
 * @author clever
 * @since 2021-10-16
 */
public enum OSS_CTL_TYPE {


    //私有访问
    CTL_PRIVATE("0", CannedAccessControlList.Private),

    //公共读
    CTL_PUBLIC_READ("1", CannedAccessControlList.PublicRead),

    //公共读写
    CTL_PUBLIC_READ_WRITE("2", CannedAccessControlList.PublicReadWrite);

    public String code;

    public CannedAccessControlList ctr;

    OSS_CTL_TYPE(String code,CannedAccessControlList ctr){
        this.code = code;
        this.ctr = ctr;
    }

    public String getCode(){
        return this.code;
    }

    public CannedAccessControlList getCtr(){
        return this.ctr;
    }
}
